Oil Refinery Production Model Code
to simulate a refinery's entire Distillation units
in one run.
Goal for this page: show how to simulate a refinery's entire/total Distillation units in one run.
On this page, we'll attempt to guide you through the various model routines in order to create a 'picture' for you to understand what's going on.
1. State number of plants / refineries and the number of products.
nRefineries = 22: nProducts = 33
2. Add a 'nRefineries' loop around ALL the distillation units. See the arrows pointing to new code additions.
model Processing ! All distillation units @ All refinery
do i = 1, nRefineries
! assume distillation requires solving a PDE or two.
! below is the bases for solving a PDE.
t = 0: tPrt = tPrint
do j = 1, nDistillUnits(i)
Initiate ISIS for PDEquations ooo
do while (t .lt. tFinal)
ooo
The next article will show how to tweak/optimize the results for ALL refineries.